package com.example.demo.controller;

/**
 *@ClassName PushController
 *@Description TODO
 *@Author ydzhao
 *@Date 2022/8/2 15:48
 */

import com.example.demo.service.Pusher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Push {
    /**
     * 要推送的用户openid
     */
    @Value("${target.openId}")
    private String target;

    @Autowired
    Pusher pusherService;

    /**
     * 微信测试账号推送
     */
    @GetMapping("/push")
    public void push() {
        pusherService.push(target);
    }


}